/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = '';
  
  checkConfig(config);
  @endpoint = getEndpoint('mseap', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model ActivateLicenseRequest {
  bizId?: string(name='BizId', example='P20211118170645000001'),
  bizType?: string(name='BizType', example='esp.bookkeeping_course'),
  licenseCode?: string(name='LicenseCode', example='B09YICKLVHNR7ZQR'),
  licenseNo?: string(name='LicenseNo'),
  licensePublisher?: string(name='LicensePublisher', example='yunMarket'),
}

model ActivateLicenseResponseBody = {
  data?: boolean(name='Data', example='True'),
  requestId?: string(name='RequestId', example='88EDA98E-6BE7-55DA-9EB6-B6444B882C59'),
}

model ActivateLicenseResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ActivateLicenseResponseBody(name='body'),
}

async function activateLicenseWithOptions(request: ActivateLicenseRequest, runtime: Util.RuntimeOptions): ActivateLicenseResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizType)) {
    query['BizType'] = request.bizType;
  }
  if (!Util.isUnset(request.licenseCode)) {
    query['LicenseCode'] = request.licenseCode;
  }
  if (!Util.isUnset(request.licenseNo)) {
    query['LicenseNo'] = request.licenseNo;
  }
  if (!Util.isUnset(request.licensePublisher)) {
    query['LicensePublisher'] = request.licensePublisher;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ActivateLicense',
    version = '2021-01-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function activateLicense(request: ActivateLicenseRequest): ActivateLicenseResponse {
  var runtime = new Util.RuntimeOptions{};
  return activateLicenseWithOptions(request, runtime);
}

model BusinessLicenseOcrRequest {
  bizCode?: string(name='BizCode', example='xxx'),
  fileInfo?: string(name='FileInfo', example='https://image-test.xxx-cn-beijing.aliyuncs.com/sfz/test.jpg'),
  fileStoreType?: string(name='FileStoreType', example='httpUrl'),
  lang?: string(name='Lang'),
}

model BusinessLicenseOcrResponseBody = {
  address?: string(name='Address'),
  business?: string(name='Business'),
  capital?: string(name='Capital'),
  establishDate?: string(name='EstablishDate', example='20181102'),
  legalPerson?: string(name='LegalPerson'),
  name?: string(name='Name'),
  registerNumber?: string(name='RegisterNumber', example='91220110WM2H12QL1M'),
  requestId?: string(name='RequestId', example='1940A84F-6D90-5764-9119-6279970C6FF5'),
  trackId?: string(name='TrackId', example='fc6502a2-73cf-456f-8de0-4b9582a6880c'),
  type?: string(name='Type'),
  validPeriod?: string(name='ValidPeriod', example='29991231'),
}

model BusinessLicenseOcrResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: BusinessLicenseOcrResponseBody(name='body'),
}

async function businessLicenseOcrWithOptions(request: BusinessLicenseOcrRequest, runtime: Util.RuntimeOptions): BusinessLicenseOcrResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizCode)) {
    query['BizCode'] = request.bizCode;
  }
  if (!Util.isUnset(request.fileInfo)) {
    query['FileInfo'] = request.fileInfo;
  }
  if (!Util.isUnset(request.fileStoreType)) {
    query['FileStoreType'] = request.fileStoreType;
  }
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'BusinessLicenseOcr',
    version = '2021-01-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function businessLicenseOcr(request: BusinessLicenseOcrRequest): BusinessLicenseOcrResponse {
  var runtime = new Util.RuntimeOptions{};
  return businessLicenseOcrWithOptions(request, runtime);
}

model CallbackTaskRequest {
  aliyunKp?: string(name='AliyunKp', description='aliyunKp', example='1'),
  aliyunKpLong?: long(name='AliyunKpLong', description='aliyunKpLong', example='1'),
  apiType?: string(name='ApiType', description='apiType', example='MPC'),
  bid?: string(name='Bid', description='bid', example='26842'),
  bizCode?: string(name='BizCode'),
  callerParentId?: long(name='CallerParentId', description='callerParentId', example='1'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport', description='callerSecurityTransport', example='true'),
  callerType?: string(name='CallerType', description='callerType', example='product'),
  clientIp?: string(name='ClientIp', description='clientIp', example='113.118.225.22'),
  lang?: string(name='Lang', description='lang', example='zh'),
  mfaPresent?: boolean(name='MfaPresent', description='mfaPresent', example='false'),
  orderId?: string(name='OrderId', description='orderId', example='1672369049358'),
  originalRequest?: string(name='OriginalRequest', description='originalRequest', example='1'),
  outTaskId?: string(name='OutTaskId', description='outTaskId', example='1'),
  popAction?: string(name='PopAction', description='popAction', example='1'),
  principalKey?: string(name='PrincipalKey'),
  proxyCallerIp?: string(name='ProxyCallerIp', description='proxyCallerIp', example='1'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport', description='proxyCallerSecurityTransport', example='true'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo', description='proxyTrustTransportInfo', example='true'),
  requestId?: string(name='RequestId', description='requestId', example='56B009EB-AAA5-52C9-B05F-AF425E3885E8'),
  securityToken?: string(name='SecurityToken'),
  stsTokenCallerBid?: long(name='StsTokenCallerBid', description='stsTokenCallerBid', example='1'),
  stsTokenCallerUid?: long(name='StsTokenCallerUid', description='stsTokenCallerUid', example='1'),
  taskData?: string(name='TaskData', description='taskData', example='{\\"result\\":\\"SUCCESS\\",\\"message\\":\\"null\\",\\"taskId\\":\\"8cbc97d8-9b2b-4c2f-862f-983ea5dbedc2\\"}'),
  taskId?: string(name='TaskId', description='taskId', example='2559492'),
  taskType?: string(name='TaskType', description='taskType', example='PATENT_QUERY'),
  userAccessKeyId?: string(name='UserAccessKeyId', description='userAccessKeyId', example='1'),
  userBid?: string(name='UserBid', description='userBid', example='1'),
  userCallerParentId?: long(name='UserCallerParentId', description='userCallerParentId', example='1'),
  userCallerSecurityTransport?: boolean(name='UserCallerSecurityTransport', description='userCallerSecurityTransport', example='1'),
  userCallerType?: string(name='UserCallerType', description='userCallerType', example='1'),
  userClientIp?: string(name='UserClientIp', description='userClientIp', example='1'),
  userKp?: string(name='UserKp', description='userKp', example='1'),
  userMfaPresent?: boolean(name='UserMfaPresent', description='userMfaPresent', example='1'),
  userSecurityToken?: string(name='UserSecurityToken', description='userSecurityToken', example='1'),
}

model CallbackTaskResponseBody = {
  allowRetry?: boolean(name='AllowRetry', description='allowRetry', example='False'),
  appName?: string(name='AppName', description='appName', example='bohai-web-app'),
  dynamicCode?: string(name='DynamicCode', description='dynamicCode', example='1'),
  dynamicMessage?: string(name='DynamicMessage', description='dynamicMessage', example='can not find env: vpc-sg-pre'),
  errorCode?: string(name='ErrorCode', description='errorCode', example='200'),
  errorMsg?: string(name='ErrorMsg', description='errorMsg', example='Success. Request Success.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='httpStatusCode', example='200'),
  module?: boolean(name='Module', example='True'),
  requestId?: string(name='RequestId', description='requestId', example='56B009EB-AAA5-52C9-B05F-AF425E3885E8'),
  success?: boolean(name='Success', description='success', example='True'),
}

model CallbackTaskResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CallbackTaskResponseBody(name='body'),
}

async function callbackTaskWithOptions(request: CallbackTaskRequest, runtime: Util.RuntimeOptions): CallbackTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aliyunKp)) {
    query['AliyunKp'] = request.aliyunKp;
  }
  if (!Util.isUnset(request.aliyunKpLong)) {
    query['AliyunKpLong'] = request.aliyunKpLong;
  }
  if (!Util.isUnset(request.apiType)) {
    query['ApiType'] = request.apiType;
  }
  if (!Util.isUnset(request.bid)) {
    query['Bid'] = request.bid;
  }
  if (!Util.isUnset(request.bizCode)) {
    query['BizCode'] = request.bizCode;
  }
  if (!Util.isUnset(request.callerParentId)) {
    query['CallerParentId'] = request.callerParentId;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    query['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    query['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.clientIp)) {
    query['ClientIp'] = request.clientIp;
  }
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    query['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.orderId)) {
    query['OrderId'] = request.orderId;
  }
  if (!Util.isUnset(request.originalRequest)) {
    query['OriginalRequest'] = request.originalRequest;
  }
  if (!Util.isUnset(request.outTaskId)) {
    query['OutTaskId'] = request.outTaskId;
  }
  if (!Util.isUnset(request.popAction)) {
    query['PopAction'] = request.popAction;
  }
  if (!Util.isUnset(request.principalKey)) {
    query['PrincipalKey'] = request.principalKey;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    query['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    query['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    query['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestId)) {
    query['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stsTokenCallerBid)) {
    query['StsTokenCallerBid'] = request.stsTokenCallerBid;
  }
  if (!Util.isUnset(request.stsTokenCallerUid)) {
    query['StsTokenCallerUid'] = request.stsTokenCallerUid;
  }
  if (!Util.isUnset(request.taskData)) {
    query['TaskData'] = request.taskData;
  }
  if (!Util.isUnset(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  if (!Util.isUnset(request.taskType)) {
    query['TaskType'] = request.taskType;
  }
  if (!Util.isUnset(request.userAccessKeyId)) {
    query['UserAccessKeyId'] = request.userAccessKeyId;
  }
  if (!Util.isUnset(request.userBid)) {
    query['UserBid'] = request.userBid;
  }
  if (!Util.isUnset(request.userCallerParentId)) {
    query['UserCallerParentId'] = request.userCallerParentId;
  }
  if (!Util.isUnset(request.userCallerSecurityTransport)) {
    query['UserCallerSecurityTransport'] = request.userCallerSecurityTransport;
  }
  if (!Util.isUnset(request.userCallerType)) {
    query['UserCallerType'] = request.userCallerType;
  }
  if (!Util.isUnset(request.userClientIp)) {
    query['UserClientIp'] = request.userClientIp;
  }
  if (!Util.isUnset(request.userKp)) {
    query['UserKp'] = request.userKp;
  }
  if (!Util.isUnset(request.userMfaPresent)) {
    query['UserMfaPresent'] = request.userMfaPresent;
  }
  if (!Util.isUnset(request.userSecurityToken)) {
    query['UserSecurityToken'] = request.userSecurityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CallbackTask',
    version = '2021-01-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function callbackTask(request: CallbackTaskRequest): CallbackTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return callbackTaskWithOptions(request, runtime);
}

model DescribeAgreementStatusRequest {
  agreementCode?: string(name='AgreementCode', example='10aa40008e081ad7b1fb50bffc3a70b1'),
}

model DescribeAgreementStatusResponseBody = {
  agreementCode?: string(name='AgreementCode', example='10aa40008e081ad7b1fb50bffc3a70b1'),
  requestId?: string(name='RequestId', example='6254E13A-A79F-5786-9C75-7590727342C9'),
  status?: int32(name='Status', example='0'),
  userId?: string(name='UserId', example='1219541161213057'),
}

model DescribeAgreementStatusResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeAgreementStatusResponseBody(name='body'),
}

async function describeAgreementStatusWithOptions(request: DescribeAgreementStatusRequest, runtime: Util.RuntimeOptions): DescribeAgreementStatusResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.agreementCode)) {
    query['AgreementCode'] = request.agreementCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAgreementStatus',
    version = '2021-01-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeAgreementStatus(request: DescribeAgreementStatusRequest): DescribeAgreementStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAgreementStatusWithOptions(request, runtime);
}

model GetNodeByFlowIdRequest {
  aliyunKp?: string(name='AliyunKp', description='aliyunKp', example='1'),
  aliyunKpLong?: long(name='AliyunKpLong', description='aliyunKpLong', example='1'),
  apiType?: string(name='ApiType', description='apiType', example='MPC'),
  bid?: string(name='Bid', description='bid', example='26842'),
  callerParentId?: long(name='CallerParentId', description='callerParentId', example='1'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport', description='callerSecurityTransport', example='true'),
  callerType?: string(name='CallerType', description='callerType', example='acl'),
  clientIp?: string(name='ClientIp', description='clientIp', example='121.199.64.42'),
  flowId?: long(name='FlowId', example='180'),
  lang?: string(name='Lang', description='lang', example='en'),
  mfaPresent?: boolean(name='MfaPresent', description='mfaPresent', example='false'),
  originalRequest?: string(name='OriginalRequest', description='originalRequest', example='1'),
  popAction?: string(name='PopAction', description='popAction', example='1'),
  proxyCallerIp?: string(name='ProxyCallerIp', description='proxyCallerIp', example='1'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport', description='proxyCallerSecurityTransport', example='true'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo', description='proxyTrustTransportInfo', example='1'),
  requestId?: string(name='RequestId', description='requestId', example='5E8033C9-F16D-5989-81C9-2D33C0B95FC2'),
  securityToken?: string(name='SecurityToken'),
  stsTokenCallerBid?: long(name='StsTokenCallerBid', description='stsTokenCallerBid', example='1'),
  stsTokenCallerUid?: long(name='StsTokenCallerUid', description='stsTokenCallerUid', example='1'),
  userAccessKeyId?: string(name='UserAccessKeyId', description='userAccessKeyId', example='1'),
  userBid?: string(name='UserBid', description='userBid', example='1'),
  userCallerParentId?: long(name='UserCallerParentId', description='userCallerParentId', example='1'),
  userCallerSecurityTransport?: boolean(name='UserCallerSecurityTransport', description='userCallerSecurityTransport', example='true'),
  userCallerType?: string(name='UserCallerType', description='userCallerType', example='1'),
  userClientIp?: string(name='UserClientIp', description='userClientIp', example='1'),
  userKp?: string(name='UserKp', description='userKp', example='1'),
  userMfaPresent?: boolean(name='UserMfaPresent', description='userMfaPresent', example='true'),
  userSecurityToken?: string(name='UserSecurityToken', description='userSecurityToken', example='1'),
}

model GetNodeByFlowIdResponseBody = {
  allowRetry?: boolean(name='AllowRetry', description='allowRetry', example='False'),
  appName?: string(name='AppName', description='appName', example='gatewayprood'),
  dynamicCode?: string(name='DynamicCode', description='dynamicCode', example='1'),
  dynamicMessage?: string(name='DynamicMessage', description='dynamicMessage', example='can not find env: vpc-sg-pre'),
  errorCode?: string(name='ErrorCode', description='errorCode', example='200'),
  errorMsg?: string(name='ErrorMsg', description='errorMsg', example='Success. Request Success.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='httpStatusCode', example='200'),
  module?: string(name='Module', description='module', example='200,131'),
  requestId?: string(name='RequestId', description='requestId', example='8F30A673-46F0-5774-9D25-B45A29DB626E'),
  success?: boolean(name='Success', description='success', example='True'),
}

model GetNodeByFlowIdResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetNodeByFlowIdResponseBody(name='body'),
}

async function getNodeByFlowIdWithOptions(request: GetNodeByFlowIdRequest, runtime: Util.RuntimeOptions): GetNodeByFlowIdResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aliyunKp)) {
    query['AliyunKp'] = request.aliyunKp;
  }
  if (!Util.isUnset(request.aliyunKpLong)) {
    query['AliyunKpLong'] = request.aliyunKpLong;
  }
  if (!Util.isUnset(request.apiType)) {
    query['ApiType'] = request.apiType;
  }
  if (!Util.isUnset(request.bid)) {
    query['Bid'] = request.bid;
  }
  if (!Util.isUnset(request.callerParentId)) {
    query['CallerParentId'] = request.callerParentId;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    query['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    query['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.clientIp)) {
    query['ClientIp'] = request.clientIp;
  }
  if (!Util.isUnset(request.flowId)) {
    query['FlowId'] = request.flowId;
  }
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    query['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.originalRequest)) {
    query['OriginalRequest'] = request.originalRequest;
  }
  if (!Util.isUnset(request.popAction)) {
    query['PopAction'] = request.popAction;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    query['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    query['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    query['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestId)) {
    query['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stsTokenCallerBid)) {
    query['StsTokenCallerBid'] = request.stsTokenCallerBid;
  }
  if (!Util.isUnset(request.stsTokenCallerUid)) {
    query['StsTokenCallerUid'] = request.stsTokenCallerUid;
  }
  if (!Util.isUnset(request.userAccessKeyId)) {
    query['UserAccessKeyId'] = request.userAccessKeyId;
  }
  if (!Util.isUnset(request.userBid)) {
    query['UserBid'] = request.userBid;
  }
  if (!Util.isUnset(request.userCallerParentId)) {
    query['UserCallerParentId'] = request.userCallerParentId;
  }
  if (!Util.isUnset(request.userCallerSecurityTransport)) {
    query['UserCallerSecurityTransport'] = request.userCallerSecurityTransport;
  }
  if (!Util.isUnset(request.userCallerType)) {
    query['UserCallerType'] = request.userCallerType;
  }
  if (!Util.isUnset(request.userClientIp)) {
    query['UserClientIp'] = request.userClientIp;
  }
  if (!Util.isUnset(request.userKp)) {
    query['UserKp'] = request.userKp;
  }
  if (!Util.isUnset(request.userMfaPresent)) {
    query['UserMfaPresent'] = request.userMfaPresent;
  }
  if (!Util.isUnset(request.userSecurityToken)) {
    query['UserSecurityToken'] = request.userSecurityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetNodeByFlowId',
    version = '2021-01-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getNodeByFlowId(request: GetNodeByFlowIdRequest): GetNodeByFlowIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return getNodeByFlowIdWithOptions(request, runtime);
}

model GetNodeByTemplateIdRequest {
  aliyunKp?: string(name='AliyunKp', description='aliyunKp', example='1'),
  aliyunKpLong?: long(name='AliyunKpLong', description='aliyunKpLong', example='1'),
  apiType?: string(name='ApiType', description='apiType', example='openAPI'),
  bid?: string(name='Bid', description='bid', example='26842'),
  callerParentId?: long(name='CallerParentId', description='callerParentId', example='1'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport', description='callerSecurityTransport', example='true'),
  callerType?: string(name='CallerType', description='callerType', example='product'),
  clientIp?: string(name='ClientIp', description='clientIp', example='192.168.166.188'),
  lang?: string(name='Lang', description='lang', example='zh'),
  mfaPresent?: boolean(name='MfaPresent', description='mfaPresent', example='false'),
  originalRequest?: string(name='OriginalRequest', description='originalRequest', example='1'),
  popAction?: string(name='PopAction', description='popAction', example='1'),
  proxyCallerIp?: string(name='ProxyCallerIp', description='proxyCallerIp', example='1'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport', description='proxyCallerSecurityTransport', example='true'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo', description='proxyTrustTransportInfo', example='true'),
  requestId?: string(name='RequestId', description='requestId', example='F5191EB7-3A36-599D-A7DC-6493095F6978'),
  securityToken?: string(name='SecurityToken'),
  stsTokenCallerBid?: long(name='StsTokenCallerBid', description='stsTokenCallerBid', example='1'),
  stsTokenCallerUid?: long(name='StsTokenCallerUid', description='stsTokenCallerUid', example='1'),
  templateId?: long(name='TemplateId', example='13'),
  userAccessKeyId?: string(name='UserAccessKeyId', description='userAccessKeyId', example='1'),
  userBid?: string(name='UserBid', description='userBid', example='1'),
  userCallerParentId?: long(name='UserCallerParentId', description='userCallerParentId', example='1'),
  userCallerSecurityTransport?: boolean(name='UserCallerSecurityTransport', description='userCallerSecurityTransport', example='true'),
  userCallerType?: string(name='UserCallerType', description='userCallerType', example='true'),
  userClientIp?: string(name='UserClientIp', description='userClientIp', example='1'),
  userKp?: string(name='UserKp', description='userKp', example='1'),
  userMfaPresent?: boolean(name='UserMfaPresent', description='userMfaPresent', example='true'),
  userSecurityToken?: string(name='UserSecurityToken', description='userSecurityToken', example='1'),
}

model GetNodeByTemplateIdResponseBody = {
  allowRetry?: boolean(name='AllowRetry', description='allowRetry', example='False'),
  appName?: string(name='AppName', description='appName', example='qdhxgcagent01'),
  dynamicCode?: string(name='DynamicCode', description='dynamicCode', example='1'),
  dynamicMessage?: string(name='DynamicMessage', description='dynamicMessage', example='The specified parameter is invalid.'),
  errorCode?: string(name='ErrorCode', description='errorCode', example='200'),
  errorMsg?: string(name='ErrorMsg', description='errorMsg', example='zxdfghjklasdfghjkl'),
  httpStatusCode?: int32(name='HttpStatusCode', description='httpStatusCode', example='200'),
  module?: string(name='Module', description='module', example='220,116'),
  requestId?: string(name='RequestId', description='requestId', example='53D045B1-466F-5165-B3BB-42E36F02BA86'),
  success?: boolean(name='Success', description='success', example='True'),
}

model GetNodeByTemplateIdResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetNodeByTemplateIdResponseBody(name='body'),
}

async function getNodeByTemplateIdWithOptions(request: GetNodeByTemplateIdRequest, runtime: Util.RuntimeOptions): GetNodeByTemplateIdResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aliyunKp)) {
    query['AliyunKp'] = request.aliyunKp;
  }
  if (!Util.isUnset(request.aliyunKpLong)) {
    query['AliyunKpLong'] = request.aliyunKpLong;
  }
  if (!Util.isUnset(request.apiType)) {
    query['ApiType'] = request.apiType;
  }
  if (!Util.isUnset(request.bid)) {
    query['Bid'] = request.bid;
  }
  if (!Util.isUnset(request.callerParentId)) {
    query['CallerParentId'] = request.callerParentId;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    query['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    query['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.clientIp)) {
    query['ClientIp'] = request.clientIp;
  }
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    query['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.originalRequest)) {
    query['OriginalRequest'] = request.originalRequest;
  }
  if (!Util.isUnset(request.popAction)) {
    query['PopAction'] = request.popAction;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    query['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    query['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    query['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestId)) {
    query['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stsTokenCallerBid)) {
    query['StsTokenCallerBid'] = request.stsTokenCallerBid;
  }
  if (!Util.isUnset(request.stsTokenCallerUid)) {
    query['StsTokenCallerUid'] = request.stsTokenCallerUid;
  }
  if (!Util.isUnset(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  if (!Util.isUnset(request.userAccessKeyId)) {
    query['UserAccessKeyId'] = request.userAccessKeyId;
  }
  if (!Util.isUnset(request.userBid)) {
    query['UserBid'] = request.userBid;
  }
  if (!Util.isUnset(request.userCallerParentId)) {
    query['UserCallerParentId'] = request.userCallerParentId;
  }
  if (!Util.isUnset(request.userCallerSecurityTransport)) {
    query['UserCallerSecurityTransport'] = request.userCallerSecurityTransport;
  }
  if (!Util.isUnset(request.userCallerType)) {
    query['UserCallerType'] = request.userCallerType;
  }
  if (!Util.isUnset(request.userClientIp)) {
    query['UserClientIp'] = request.userClientIp;
  }
  if (!Util.isUnset(request.userKp)) {
    query['UserKp'] = request.userKp;
  }
  if (!Util.isUnset(request.userMfaPresent)) {
    query['UserMfaPresent'] = request.userMfaPresent;
  }
  if (!Util.isUnset(request.userSecurityToken)) {
    query['UserSecurityToken'] = request.userSecurityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetNodeByTemplateId',
    version = '2021-01-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getNodeByTemplateId(request: GetNodeByTemplateIdRequest): GetNodeByTemplateIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return getNodeByTemplateIdWithOptions(request, runtime);
}

model GetProxyByTypeRequest {
  aliyunKp?: string(name='AliyunKp', description='aliyunKp', example='1'),
  aliyunKpLong?: long(name='AliyunKpLong', description='aliyunKpLong', example='1'),
  apiType?: string(name='ApiType', description='apiType', example='openAPI'),
  bid?: string(name='Bid', description='bid', example='26842'),
  callerParentId?: long(name='CallerParentId', description='callerParentId', example='1'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport', description='callerSecurityTransport', example='true'),
  callerType?: string(name='CallerType', description='callerType', example='product'),
  clientIp?: string(name='ClientIp', description='clientIp', example='121.199.64.42'),
  lang?: string(name='Lang', description='lang', example='zh'),
  mfaPresent?: boolean(name='MfaPresent', description='mfaPresent', example='false'),
  originalRequest?: string(name='OriginalRequest', description='originalRequest', example='1'),
  popAction?: string(name='PopAction', description='popAction', example='1'),
  proxyCallerIp?: string(name='ProxyCallerIp', description='proxyCallerIp', example='1'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport', description='proxyCallerSecurityTransport', example='true'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo', description='proxyTrustTransportInfo', example='1'),
  requestId?: string(name='RequestId', description='requestId', example='CEC1731F-0DA9-5E7D-AE53-7E4D76201C48'),
  securityToken?: string(name='SecurityToken'),
  stsTokenCallerBid?: long(name='StsTokenCallerBid', description='stsTokenCallerBid', example='1'),
  stsTokenCallerUid?: long(name='StsTokenCallerUid', description='stsTokenCallerUid', example='1'),
  type?: int32(name='Type', description='type', example='2'),
  userAccessKeyId?: string(name='UserAccessKeyId', description='userAccessKeyId', example='1'),
  userBid?: string(name='UserBid', description='userBid', example='1'),
  userCallerParentId?: long(name='UserCallerParentId', description='userCallerParentId', example='1'),
  userCallerSecurityTransport?: boolean(name='UserCallerSecurityTransport', description='userCallerSecurityTransport', example='1'),
  userCallerType?: string(name='UserCallerType', description='userCallerType', example='1'),
  userClientIp?: string(name='UserClientIp', description='userClientIp', example='1'),
  userKp?: string(name='UserKp', description='userKp', example='1'),
  userMfaPresent?: boolean(name='UserMfaPresent', description='userMfaPresent', example='1'),
  userSecurityToken?: string(name='UserSecurityToken', description='userSecurityToken', example='1'),
}

model GetProxyByTypeResponseBody = {
  allowRetry?: boolean(name='AllowRetry', description='allowRetry', example='False'),
  appName?: string(name='AppName', description='appName', example='voldemort-aliyun-com'),
  dynamicCode?: string(name='DynamicCode', description='dynamicCode', example='1'),
  dynamicMessage?: string(name='DynamicMessage', description='dynamicMessage', example='The specified parameter is invalid.'),
  errorCode?: string(name='ErrorCode', description='errorCode', example='200'),
  errorMsg?: string(name='ErrorMsg', description='errorMsg', example='Success. Request Success.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='httpStatusCode', example='200'),
  module?: string(name='Module', example='118.113.245.10:3128'),
  requestId?: string(name='RequestId', description='requestId', example='CEC1731F-0DA9-5E7D-AE53-7E4D76201C48'),
  success?: boolean(name='Success', description='success', example='True'),
}

model GetProxyByTypeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetProxyByTypeResponseBody(name='body'),
}

async function getProxyByTypeWithOptions(request: GetProxyByTypeRequest, runtime: Util.RuntimeOptions): GetProxyByTypeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aliyunKp)) {
    query['AliyunKp'] = request.aliyunKp;
  }
  if (!Util.isUnset(request.aliyunKpLong)) {
    query['AliyunKpLong'] = request.aliyunKpLong;
  }
  if (!Util.isUnset(request.apiType)) {
    query['ApiType'] = request.apiType;
  }
  if (!Util.isUnset(request.bid)) {
    query['Bid'] = request.bid;
  }
  if (!Util.isUnset(request.callerParentId)) {
    query['CallerParentId'] = request.callerParentId;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    query['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    query['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.clientIp)) {
    query['ClientIp'] = request.clientIp;
  }
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    query['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.originalRequest)) {
    query['OriginalRequest'] = request.originalRequest;
  }
  if (!Util.isUnset(request.popAction)) {
    query['PopAction'] = request.popAction;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    query['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    query['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    query['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestId)) {
    query['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stsTokenCallerBid)) {
    query['StsTokenCallerBid'] = request.stsTokenCallerBid;
  }
  if (!Util.isUnset(request.stsTokenCallerUid)) {
    query['StsTokenCallerUid'] = request.stsTokenCallerUid;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  if (!Util.isUnset(request.userAccessKeyId)) {
    query['UserAccessKeyId'] = request.userAccessKeyId;
  }
  if (!Util.isUnset(request.userBid)) {
    query['UserBid'] = request.userBid;
  }
  if (!Util.isUnset(request.userCallerParentId)) {
    query['UserCallerParentId'] = request.userCallerParentId;
  }
  if (!Util.isUnset(request.userCallerSecurityTransport)) {
    query['UserCallerSecurityTransport'] = request.userCallerSecurityTransport;
  }
  if (!Util.isUnset(request.userCallerType)) {
    query['UserCallerType'] = request.userCallerType;
  }
  if (!Util.isUnset(request.userClientIp)) {
    query['UserClientIp'] = request.userClientIp;
  }
  if (!Util.isUnset(request.userKp)) {
    query['UserKp'] = request.userKp;
  }
  if (!Util.isUnset(request.userMfaPresent)) {
    query['UserMfaPresent'] = request.userMfaPresent;
  }
  if (!Util.isUnset(request.userSecurityToken)) {
    query['UserSecurityToken'] = request.userSecurityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetProxyByType',
    version = '2021-01-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getProxyByType(request: GetProxyByTypeRequest): GetProxyByTypeResponse {
  var runtime = new Util.RuntimeOptions{};
  return getProxyByTypeWithOptions(request, runtime);
}

model GetRedisValueRequest {
  aliyunKp?: string(name='AliyunKp', description='aliyunKp', example='1'),
  aliyunKpLong?: long(name='AliyunKpLong', description='aliyunKpLong', example='1'),
  apiType?: string(name='ApiType', description='apiType', example='MPC'),
  bid?: string(name='Bid', description='bid', example='26842'),
  callerParentId?: long(name='CallerParentId', description='callerParentId', example='1'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport', description='callerSecurityTransport', example='true'),
  callerType?: string(name='CallerType', description='callerType', example='acl'),
  clientIp?: string(name='ClientIp', description='clientIp', example='113.118.225.22'),
  key?: string(name='Key', description='key', example='106.14.34.208'),
  lang?: string(name='Lang', description='lang', example='zh'),
  mfaPresent?: boolean(name='MfaPresent', description='mfaPresent', example='false'),
  originalRequest?: string(name='OriginalRequest', description='originalRequest', example='1'),
  popAction?: string(name='PopAction', description='popAction', example='1'),
  proxyCallerIp?: string(name='ProxyCallerIp', description='proxyCallerIp', example='1'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport', description='proxyCallerSecurityTransport', example='true'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo', description='proxyTrustTransportInfo', example='true'),
  requestId?: string(name='RequestId', description='requestId', example='72000904-7B6A-5516-9F0D-67ABD6E19654'),
  securityToken?: string(name='SecurityToken'),
  stsTokenCallerBid?: long(name='StsTokenCallerBid', description='stsTokenCallerBid', example='1'),
  stsTokenCallerUid?: long(name='StsTokenCallerUid', description='stsTokenCallerUid', example='1'),
  timeout?: long(name='Timeout', description='timeout', example='60'),
  userAccessKeyId?: string(name='UserAccessKeyId', description='userAccessKeyId', example='1'),
  userBid?: string(name='UserBid', description='userBid', example='1'),
  userCallerParentId?: long(name='UserCallerParentId', description='userCallerParentId', example='1'),
  userCallerSecurityTransport?: boolean(name='UserCallerSecurityTransport', description='userCallerSecurityTransport', example='true'),
  userCallerType?: string(name='UserCallerType', description='userCallerType', example='1'),
  userClientIp?: string(name='UserClientIp', description='userClientIp', example='1'),
  userKp?: string(name='UserKp', description='userKp', example='1'),
  userMfaPresent?: boolean(name='UserMfaPresent', description='userMfaPresent', example='true'),
  userSecurityToken?: string(name='UserSecurityToken', description='userSecurityToken', example='1'),
  value?: string(name='Value', example='{   \\"cust_id\\":\\"1111111\\",   \\"cust_name\\":\\"aa\\" }'),
}

model GetRedisValueResponseBody = {
  allowRetry?: boolean(name='AllowRetry', description='allowRetry', example='False'),
  appName?: string(name='AppName', description='appName', example='bohai-web-app'),
  dynamicCode?: string(name='DynamicCode', description='dynamicCode', example='1'),
  dynamicMessage?: string(name='DynamicMessage', description='dynamicMessage', example='can not find env: eleme-zb'),
  errorCode?: string(name='ErrorCode', description='errorCode', example='200'),
  errorMsg?: string(name='ErrorMsg', description='errorMsg', example='zxdfghjklasdfghjkl'),
  httpStatusCode?: int32(name='HttpStatusCode', description='httpStatusCode', example='200'),
  module?: string(name='Module', description='module', example='107,72'),
  requestId?: string(name='RequestId', description='requestId', example='0320C9F4-5EDC-5355-9D7E-DF4CF6C2B3BB'),
  success?: boolean(name='Success', description='success', example='True'),
}

model GetRedisValueResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetRedisValueResponseBody(name='body'),
}

async function getRedisValueWithOptions(request: GetRedisValueRequest, runtime: Util.RuntimeOptions): GetRedisValueResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aliyunKp)) {
    query['AliyunKp'] = request.aliyunKp;
  }
  if (!Util.isUnset(request.aliyunKpLong)) {
    query['AliyunKpLong'] = request.aliyunKpLong;
  }
  if (!Util.isUnset(request.apiType)) {
    query['ApiType'] = request.apiType;
  }
  if (!Util.isUnset(request.bid)) {
    query['Bid'] = request.bid;
  }
  if (!Util.isUnset(request.callerParentId)) {
    query['CallerParentId'] = request.callerParentId;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    query['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    query['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.clientIp)) {
    query['ClientIp'] = request.clientIp;
  }
  if (!Util.isUnset(request.key)) {
    query['Key'] = request.key;
  }
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    query['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.originalRequest)) {
    query['OriginalRequest'] = request.originalRequest;
  }
  if (!Util.isUnset(request.popAction)) {
    query['PopAction'] = request.popAction;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    query['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    query['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    query['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestId)) {
    query['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stsTokenCallerBid)) {
    query['StsTokenCallerBid'] = request.stsTokenCallerBid;
  }
  if (!Util.isUnset(request.stsTokenCallerUid)) {
    query['StsTokenCallerUid'] = request.stsTokenCallerUid;
  }
  if (!Util.isUnset(request.timeout)) {
    query['Timeout'] = request.timeout;
  }
  if (!Util.isUnset(request.userAccessKeyId)) {
    query['UserAccessKeyId'] = request.userAccessKeyId;
  }
  if (!Util.isUnset(request.userBid)) {
    query['UserBid'] = request.userBid;
  }
  if (!Util.isUnset(request.userCallerParentId)) {
    query['UserCallerParentId'] = request.userCallerParentId;
  }
  if (!Util.isUnset(request.userCallerSecurityTransport)) {
    query['UserCallerSecurityTransport'] = request.userCallerSecurityTransport;
  }
  if (!Util.isUnset(request.userCallerType)) {
    query['UserCallerType'] = request.userCallerType;
  }
  if (!Util.isUnset(request.userClientIp)) {
    query['UserClientIp'] = request.userClientIp;
  }
  if (!Util.isUnset(request.userKp)) {
    query['UserKp'] = request.userKp;
  }
  if (!Util.isUnset(request.userMfaPresent)) {
    query['UserMfaPresent'] = request.userMfaPresent;
  }
  if (!Util.isUnset(request.userSecurityToken)) {
    query['UserSecurityToken'] = request.userSecurityToken;
  }
  if (!Util.isUnset(request.value)) {
    query['Value'] = request.value;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetRedisValue',
    version = '2021-01-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getRedisValue(request: GetRedisValueRequest): GetRedisValueResponse {
  var runtime = new Util.RuntimeOptions{};
  return getRedisValueWithOptions(request, runtime);
}

model GetVariableRequest {
  aliyunKp?: string(name='AliyunKp', description='aliyunKp', example='1'),
  aliyunKpLong?: long(name='AliyunKpLong', description='aliyunKpLong', example='1'),
  apiType?: string(name='ApiType', description='apiType', example='openAPI'),
  bid?: string(name='Bid', description='bid', example='26842'),
  callerParentId?: long(name='CallerParentId', description='callerParentId', example='1'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport', description='callerSecurityTransport', example='true'),
  callerType?: string(name='CallerType', description='callerType', example='product'),
  clientIp?: string(name='ClientIp', description='clientIp', example='211.162.236.77'),
  lang?: string(name='Lang', description='lang', example='zh'),
  mfaPresent?: boolean(name='MfaPresent', description='mfaPresent', example='false'),
  originalRequest?: string(name='OriginalRequest', description='originalRequest', example='1'),
  popAction?: string(name='PopAction', description='popAction', example='1'),
  proxyCallerIp?: string(name='ProxyCallerIp', description='proxyCallerIp', example='1'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport', description='proxyCallerSecurityTransport', example='true'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo', description='proxyTrustTransportInfo', example='true'),
  requestId?: string(name='RequestId', description='requestId', example='B571E901-2F94-5135-A48A-ED3FC45805BF'),
  securityToken?: string(name='SecurityToken'),
  stsTokenCallerBid?: long(name='StsTokenCallerBid', description='stsTokenCallerBid', example='1'),
  stsTokenCallerUid?: long(name='StsTokenCallerUid', description='stsTokenCallerUid', example='1'),
  templateId?: long(name='TemplateId', example='17'),
  userAccessKeyId?: string(name='UserAccessKeyId', description='userAccessKeyId', example='1'),
  userBid?: string(name='UserBid', description='userBid', example='1'),
  userCallerParentId?: long(name='UserCallerParentId', description='userCallerParentId', example='1'),
  userCallerSecurityTransport?: boolean(name='UserCallerSecurityTransport', description='userCallerSecurityTransport', example='true'),
  userCallerType?: string(name='UserCallerType', description='userCallerType', example='1'),
  userClientIp?: string(name='UserClientIp', description='userClientIp', example='1'),
  userKp?: string(name='UserKp', description='userKp', example='1'),
  userMfaPresent?: boolean(name='UserMfaPresent', description='userMfaPresent', example='true'),
  userSecurityToken?: string(name='UserSecurityToken', description='userSecurityToken', example='1'),
}

model GetVariableResponseBody = {
  allowRetry?: boolean(name='AllowRetry', description='allowRetry', example='False'),
  appName?: string(name='AppName', description='appName', example='voldemort-aliyun-com'),
  dynamicCode?: string(name='DynamicCode', description='dynamicCode', example='1'),
  dynamicMessage?: string(name='DynamicMessage', description='dynamicMessage', example='can not find env: eleme-zb-pre'),
  errorCode?: string(name='ErrorCode', description='errorCode', example='200'),
  errorMsg?: string(name='ErrorMsg', description='errorMsg', example='Success. Request Success.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='httpStatusCode', example='200'),
  module?: string(name='Module', description='module', example='207,155'),
  requestId?: string(name='RequestId', description='requestId', example='D28419C9-335E-50A7-BD7D-ACF250A825E8'),
  success?: boolean(name='Success', description='success', example='true'),
}

model GetVariableResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetVariableResponseBody(name='body'),
}

async function getVariableWithOptions(request: GetVariableRequest, runtime: Util.RuntimeOptions): GetVariableResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aliyunKp)) {
    query['AliyunKp'] = request.aliyunKp;
  }
  if (!Util.isUnset(request.aliyunKpLong)) {
    query['AliyunKpLong'] = request.aliyunKpLong;
  }
  if (!Util.isUnset(request.apiType)) {
    query['ApiType'] = request.apiType;
  }
  if (!Util.isUnset(request.bid)) {
    query['Bid'] = request.bid;
  }
  if (!Util.isUnset(request.callerParentId)) {
    query['CallerParentId'] = request.callerParentId;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    query['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    query['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.clientIp)) {
    query['ClientIp'] = request.clientIp;
  }
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    query['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.originalRequest)) {
    query['OriginalRequest'] = request.originalRequest;
  }
  if (!Util.isUnset(request.popAction)) {
    query['PopAction'] = request.popAction;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    query['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    query['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    query['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestId)) {
    query['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stsTokenCallerBid)) {
    query['StsTokenCallerBid'] = request.stsTokenCallerBid;
  }
  if (!Util.isUnset(request.stsTokenCallerUid)) {
    query['StsTokenCallerUid'] = request.stsTokenCallerUid;
  }
  if (!Util.isUnset(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  if (!Util.isUnset(request.userAccessKeyId)) {
    query['UserAccessKeyId'] = request.userAccessKeyId;
  }
  if (!Util.isUnset(request.userBid)) {
    query['UserBid'] = request.userBid;
  }
  if (!Util.isUnset(request.userCallerParentId)) {
    query['UserCallerParentId'] = request.userCallerParentId;
  }
  if (!Util.isUnset(request.userCallerSecurityTransport)) {
    query['UserCallerSecurityTransport'] = request.userCallerSecurityTransport;
  }
  if (!Util.isUnset(request.userCallerType)) {
    query['UserCallerType'] = request.userCallerType;
  }
  if (!Util.isUnset(request.userClientIp)) {
    query['UserClientIp'] = request.userClientIp;
  }
  if (!Util.isUnset(request.userKp)) {
    query['UserKp'] = request.userKp;
  }
  if (!Util.isUnset(request.userMfaPresent)) {
    query['UserMfaPresent'] = request.userMfaPresent;
  }
  if (!Util.isUnset(request.userSecurityToken)) {
    query['UserSecurityToken'] = request.userSecurityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetVariable',
    version = '2021-01-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getVariable(request: GetVariableRequest): GetVariableResponse {
  var runtime = new Util.RuntimeOptions{};
  return getVariableWithOptions(request, runtime);
}

model IdentifyCodeRequest {
  aliyunKp?: string(name='AliyunKp', description='aliyunKp', example='1'),
  aliyunKpLong?: long(name='AliyunKpLong', description='aliyunKpLong', example='1'),
  apiType?: string(name='ApiType', description='apiType', example='openAPI'),
  bid?: string(name='Bid', description='bid', example='26842'),
  callerParentId?: long(name='CallerParentId', description='callerParentId', example='1'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport', description='callerSecurityTransport', example='true'),
  callerType?: string(name='CallerType', description='callerType', example='product'),
  clientIp?: string(name='ClientIp', description='clientIp', example='112.43.18.118'),
  data?: string(name='Data', example='{\\"engine\\": \\"MySQL\\", \\"instanceId\\": \\"rm-2zes07949gc0febg6\\", \\"userId\\": \\"1204765431532768\\", \\"previousExistConfig\\": False, \\"engineVersion\\": \\"8.0\\", \\"autoResourceOptimize\\": 0, \\"dasProOn\\": False}'),
  label?: string(name='Label', example='1551278'),
  lang?: string(name='Lang', description='lang', example='zh'),
  mfaPresent?: boolean(name='MfaPresent', description='mfaPresent', example='false'),
  originalRequest?: string(name='OriginalRequest', description='originalRequest', example='1'),
  popAction?: string(name='PopAction', description='popAction', example='1'),
  proxyCallerIp?: string(name='ProxyCallerIp', description='proxyCallerIp', example='1'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport', description='proxyCallerSecurityTransport', example='true'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo', description='proxyTrustTransportInfo', example='true'),
  requestId?: string(name='RequestId', description='requestId', example='2E0902C7-19D1-5E46-837F-95C53C04801E'),
  securityToken?: string(name='SecurityToken'),
  stsTokenCallerBid?: long(name='StsTokenCallerBid', description='stsTokenCallerBid', example='1'),
  stsTokenCallerUid?: long(name='StsTokenCallerUid', description='stsTokenCallerUid', example='1'),
  type?: string(name='Type', example='CBWP'),
  userAccessKeyId?: string(name='UserAccessKeyId', description='userAccessKeyId', example='1'),
  userBid?: string(name='UserBid', description='userBid', example='1'),
  userCallerParentId?: long(name='UserCallerParentId', description='userCallerParentId', example='1'),
  userCallerSecurityTransport?: boolean(name='UserCallerSecurityTransport', description='userCallerSecurityTransport', example='true'),
  userCallerType?: string(name='UserCallerType', description='userCallerType', example='1'),
  userClientIp?: string(name='UserClientIp', description='userClientIp', example='1'),
  userKp?: string(name='UserKp', description='userKp', example='1'),
  userMfaPresent?: boolean(name='UserMfaPresent', description='userMfaPresent', example='true'),
  userSecurityToken?: string(name='UserSecurityToken', description='userSecurityToken', example='1'),
}

model IdentifyCodeResponseBody = {
  allowRetry?: boolean(name='AllowRetry', description='allowRetry', example='False'),
  appName?: string(name='AppName', description='appName', example='baasamlservice'),
  dynamicCode?: string(name='DynamicCode', description='dynamicCode', example='1'),
  dynamicMessage?: string(name='DynamicMessage', description='dynamicMessage', example='can not find env: lazada-sg-pre'),
  errorCode?: string(name='ErrorCode', description='errorCode', example='200'),
  errorMsg?: string(name='ErrorMsg', description='errorMsg', example='1234567890'),
  httpStatusCode?: int32(name='HttpStatusCode', description='httpStatusCode', example='200'),
  module?: string(name='Module', description='module', example='230,94'),
  requestId?: string(name='RequestId', description='requestId', example='8F30A673-46F0-5774-9D25-B45A29DB626E'),
  success?: boolean(name='Success', description='success', example='True'),
}

model IdentifyCodeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: IdentifyCodeResponseBody(name='body'),
}

async function identifyCodeWithOptions(request: IdentifyCodeRequest, runtime: Util.RuntimeOptions): IdentifyCodeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aliyunKp)) {
    query['AliyunKp'] = request.aliyunKp;
  }
  if (!Util.isUnset(request.aliyunKpLong)) {
    query['AliyunKpLong'] = request.aliyunKpLong;
  }
  if (!Util.isUnset(request.apiType)) {
    query['ApiType'] = request.apiType;
  }
  if (!Util.isUnset(request.bid)) {
    query['Bid'] = request.bid;
  }
  if (!Util.isUnset(request.callerParentId)) {
    query['CallerParentId'] = request.callerParentId;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    query['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    query['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.clientIp)) {
    query['ClientIp'] = request.clientIp;
  }
  if (!Util.isUnset(request.data)) {
    query['Data'] = request.data;
  }
  if (!Util.isUnset(request.label)) {
    query['Label'] = request.label;
  }
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    query['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.originalRequest)) {
    query['OriginalRequest'] = request.originalRequest;
  }
  if (!Util.isUnset(request.popAction)) {
    query['PopAction'] = request.popAction;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    query['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    query['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    query['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestId)) {
    query['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stsTokenCallerBid)) {
    query['StsTokenCallerBid'] = request.stsTokenCallerBid;
  }
  if (!Util.isUnset(request.stsTokenCallerUid)) {
    query['StsTokenCallerUid'] = request.stsTokenCallerUid;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  if (!Util.isUnset(request.userAccessKeyId)) {
    query['UserAccessKeyId'] = request.userAccessKeyId;
  }
  if (!Util.isUnset(request.userBid)) {
    query['UserBid'] = request.userBid;
  }
  if (!Util.isUnset(request.userCallerParentId)) {
    query['UserCallerParentId'] = request.userCallerParentId;
  }
  if (!Util.isUnset(request.userCallerSecurityTransport)) {
    query['UserCallerSecurityTransport'] = request.userCallerSecurityTransport;
  }
  if (!Util.isUnset(request.userCallerType)) {
    query['UserCallerType'] = request.userCallerType;
  }
  if (!Util.isUnset(request.userClientIp)) {
    query['UserClientIp'] = request.userClientIp;
  }
  if (!Util.isUnset(request.userKp)) {
    query['UserKp'] = request.userKp;
  }
  if (!Util.isUnset(request.userMfaPresent)) {
    query['UserMfaPresent'] = request.userMfaPresent;
  }
  if (!Util.isUnset(request.userSecurityToken)) {
    query['UserSecurityToken'] = request.userSecurityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'IdentifyCode',
    version = '2021-01-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function identifyCode(request: IdentifyCodeRequest): IdentifyCodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return identifyCodeWithOptions(request, runtime);
}

model IdentityCardOcrRequest {
  bizCode?: string(name='BizCode', example='xxx'),
  fileInfo?: string(name='FileInfo', example='https://image-test.xxx-cn-beijing.aliyuncs.com/sfz/test.jpg'),
  fileStoreType?: string(name='FileStoreType', example='httpUrl'),
  lang?: string(name='Lang'),
}

model IdentityCardOcrResponseBody = {
  address?: string(name='Address'),
  birthDate?: string(name='BirthDate'),
  gender?: string(name='Gender'),
  idNumber?: string(name='IdNumber', example='41072219921111000X'),
  issue?: string(name='Issue'),
  name?: string(name='Name'),
  nationality?: string(name='Nationality'),
  requestId?: string(name='RequestId', example='134B979B-860C-4D8D-A7AB-F618CA488X2'),
  trackId?: string(name='TrackId', example='5b29647n-a172-4ccd-ba33-73669896c287'),
  validDate?: string(name='ValidDate', example='2018.12.12~2038.12.12'),
}

model IdentityCardOcrResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: IdentityCardOcrResponseBody(name='body'),
}

async function identityCardOcrWithOptions(request: IdentityCardOcrRequest, runtime: Util.RuntimeOptions): IdentityCardOcrResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizCode)) {
    query['BizCode'] = request.bizCode;
  }
  if (!Util.isUnset(request.fileInfo)) {
    query['FileInfo'] = request.fileInfo;
  }
  if (!Util.isUnset(request.fileStoreType)) {
    query['FileStoreType'] = request.fileStoreType;
  }
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'IdentityCardOcr',
    version = '2021-01-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function identityCardOcr(request: IdentityCardOcrRequest): IdentityCardOcrResponse {
  var runtime = new Util.RuntimeOptions{};
  return identityCardOcrWithOptions(request, runtime);
}

model PullRpaModelRequest {
  aliyunKp?: string(name='AliyunKp', description='aliyunKp', example='1'),
  aliyunKpLong?: long(name='AliyunKpLong', description='aliyunKpLong', example='1'),
  apiType?: string(name='ApiType', description='apiType', example='openAPI'),
  bid?: string(name='Bid', description='bid', example='26842'),
  callerParentId?: long(name='CallerParentId', description='callerParentId', example='1'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport', description='callerSecurityTransport', example='true'),
  callerType?: string(name='CallerType', description='callerType', example='product'),
  clientIp?: string(name='ClientIp', description='clientIp', example='112.43.18.118'),
  lang?: string(name='Lang', description='lang', example='zh'),
  mfaPresent?: boolean(name='MfaPresent', description='mfaPresent', example='false'),
  originalRequest?: string(name='OriginalRequest', description='originalRequest', example='1'),
  popAction?: string(name='PopAction', description='popAction', example='1'),
  proxyCallerIp?: string(name='ProxyCallerIp', description='proxyCallerIp', example='1'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport', description='proxyCallerSecurityTransport', example='true'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo', description='proxyTrustTransportInfo', example='1'),
  requestId?: string(name='RequestId', description='requestId', example='06055768-6BC0-5FE7-BDFF-BD4D79537035'),
  securityToken?: string(name='SecurityToken'),
  stsTokenCallerBid?: long(name='StsTokenCallerBid', description='stsTokenCallerBid', example='1'),
  stsTokenCallerUid?: long(name='StsTokenCallerUid', description='stsTokenCallerUid', example='1'),
  templateId?: long(name='TemplateId', description='templateId', example='17'),
  userAccessKeyId?: string(name='UserAccessKeyId', description='userAccessKeyId', example='1'),
  userBid?: string(name='UserBid', description='userBid', example='1'),
  userCallerParentId?: long(name='UserCallerParentId', description='userCallerParentId', example='1'),
  userCallerSecurityTransport?: boolean(name='UserCallerSecurityTransport', description='userCallerSecurityTransport', example='1'),
  userCallerType?: string(name='UserCallerType', description='userCallerType', example='1'),
  userClientIp?: string(name='UserClientIp', description='userClientIp', example='1'),
  userKp?: string(name='UserKp', description='userKp', example='1'),
  userMfaPresent?: boolean(name='UserMfaPresent', description='userMfaPresent', example='1'),
  userSecurityToken?: string(name='UserSecurityToken', description='userSecurityToken', example='1'),
}

model PullRpaModelResponseBody = {
  allowRetry?: boolean(name='AllowRetry', description='allowRetry', example='False'),
  appName?: string(name='AppName', description='appName', example='gatewayprood'),
  dynamicCode?: string(name='DynamicCode', description='dynamicCode', example='1'),
  dynamicMessage?: string(name='DynamicMessage', description='dynamicMessage', example='can not find env: vpc-sg-pre'),
  errorCode?: string(name='ErrorCode', description='errorCode', example='100008'),
  errorMsg?: string(name='ErrorMsg', description='errorMsg', example='Success. Request Success.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='httpStatusCode', example='200'),
  module?: string(name='Module', example='{}'),
  requestId?: string(name='RequestId', description='requestId', example='06055768-6BC0-5FE7-BDFF-BD4D79537035'),
  success?: boolean(name='Success', description='success', example='True'),
}

model PullRpaModelResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: PullRpaModelResponseBody(name='body'),
}

async function pullRpaModelWithOptions(request: PullRpaModelRequest, runtime: Util.RuntimeOptions): PullRpaModelResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aliyunKp)) {
    query['AliyunKp'] = request.aliyunKp;
  }
  if (!Util.isUnset(request.aliyunKpLong)) {
    query['AliyunKpLong'] = request.aliyunKpLong;
  }
  if (!Util.isUnset(request.apiType)) {
    query['ApiType'] = request.apiType;
  }
  if (!Util.isUnset(request.bid)) {
    query['Bid'] = request.bid;
  }
  if (!Util.isUnset(request.callerParentId)) {
    query['CallerParentId'] = request.callerParentId;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    query['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    query['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.clientIp)) {
    query['ClientIp'] = request.clientIp;
  }
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    query['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.originalRequest)) {
    query['OriginalRequest'] = request.originalRequest;
  }
  if (!Util.isUnset(request.popAction)) {
    query['PopAction'] = request.popAction;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    query['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    query['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    query['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestId)) {
    query['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stsTokenCallerBid)) {
    query['StsTokenCallerBid'] = request.stsTokenCallerBid;
  }
  if (!Util.isUnset(request.stsTokenCallerUid)) {
    query['StsTokenCallerUid'] = request.stsTokenCallerUid;
  }
  if (!Util.isUnset(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  if (!Util.isUnset(request.userAccessKeyId)) {
    query['UserAccessKeyId'] = request.userAccessKeyId;
  }
  if (!Util.isUnset(request.userBid)) {
    query['UserBid'] = request.userBid;
  }
  if (!Util.isUnset(request.userCallerParentId)) {
    query['UserCallerParentId'] = request.userCallerParentId;
  }
  if (!Util.isUnset(request.userCallerSecurityTransport)) {
    query['UserCallerSecurityTransport'] = request.userCallerSecurityTransport;
  }
  if (!Util.isUnset(request.userCallerType)) {
    query['UserCallerType'] = request.userCallerType;
  }
  if (!Util.isUnset(request.userClientIp)) {
    query['UserClientIp'] = request.userClientIp;
  }
  if (!Util.isUnset(request.userKp)) {
    query['UserKp'] = request.userKp;
  }
  if (!Util.isUnset(request.userMfaPresent)) {
    query['UserMfaPresent'] = request.userMfaPresent;
  }
  if (!Util.isUnset(request.userSecurityToken)) {
    query['UserSecurityToken'] = request.userSecurityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'PullRpaModel',
    version = '2021-01-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function pullRpaModel(request: PullRpaModelRequest): PullRpaModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return pullRpaModelWithOptions(request, runtime);
}

model PullTaskRequest {
  aliyunKp?: string(name='AliyunKp', description='aliyunKp', example='1'),
  aliyunKpLong?: long(name='AliyunKpLong', description='aliyunKpLong', example='1'),
  apiType?: string(name='ApiType', description='apiType', example='openAPI'),
  bid?: string(name='Bid', description='bid', example='26842'),
  bizCode?: string(name='BizCode'),
  callerParentId?: long(name='CallerParentId', description='callerParentId', example='1'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport', description='callerSecurityTransport', example='true'),
  callerType?: string(name='CallerType', description='callerType', example='product'),
  clientIp?: string(name='ClientIp', description='clientIp', example='211.162.236.77'),
  lang?: string(name='Lang', description='lang', example='zh'),
  mfaPresent?: boolean(name='MfaPresent', description='mfaPresent', example='false'),
  orderId?: string(name='OrderId', example='1672369049358'),
  originalRequest?: string(name='OriginalRequest', description='originalRequest', example='1'),
  popAction?: string(name='PopAction', description='popAction', example='1'),
  principalKey?: string(name='PrincipalKey'),
  proxyCallerIp?: string(name='ProxyCallerIp', description='proxyCallerIp', example='1'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport', description='proxyCallerSecurityTransport', example='true'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo', description='proxyTrustTransportInfo', example='true'),
  requestId?: string(name='RequestId', description='requestId', example='69258200-3A87-5504-93B2-22929E48A531'),
  securityToken?: string(name='SecurityToken'),
  stsTokenCallerBid?: long(name='StsTokenCallerBid', description='stsTokenCallerBid', example='1'),
  stsTokenCallerUid?: long(name='StsTokenCallerUid', description='stsTokenCallerUid', example='1'),
  taskType?: string(name='TaskType', description='taskType', example='PATENT_CHECK'),
  userAccessKeyId?: string(name='UserAccessKeyId', description='userAccessKeyId', example='1'),
  userBid?: string(name='UserBid', description='userBid', example='1'),
  userCallerParentId?: long(name='UserCallerParentId', description='userCallerParentId', example='1'),
  userCallerSecurityTransport?: boolean(name='UserCallerSecurityTransport', description='userCallerSecurityTransport', example='1'),
  userCallerType?: string(name='UserCallerType', description='userCallerType', example='1'),
  userClientIp?: string(name='UserClientIp', description='userClientIp', example='1'),
  userKp?: string(name='UserKp', description='userKp', example='1'),
  userMfaPresent?: boolean(name='UserMfaPresent', description='userMfaPresent', example='1'),
  userSecurityToken?: string(name='UserSecurityToken', description='userSecurityToken', example='1'),
}

model PullTaskResponseBody = {
  allowRetry?: boolean(name='AllowRetry', description='allowRetry', example='False'),
  appName?: string(name='AppName', description='appName', example='voldemort-aliyun-com'),
  dynamicCode?: string(name='DynamicCode', description='dynamicCode', example='1'),
  dynamicMessage?: string(name='DynamicMessage', description='dynamicMessage', example='The specified parameter is invalid.'),
  errorCode?: string(name='ErrorCode', description='errorCode', example='200'),
  errorMsg?: string(name='ErrorMsg', description='errorMsg'),
  httpStatusCode?: int32(name='HttpStatusCode', description='httpStatusCode', example='200'),
  module?: {
    bizCode?: string(name='BizCode'),
    orderId?: string(name='OrderId', example='1649470201045'),
    outTaskId?: string(name='OutTaskId', example='1'),
    principalKey?: string(name='PrincipalKey'),
    taskData?: string(name='TaskData', example='{\\"result\\":\\"SUCCESS\\",\\"message\\":\\"null\\",\\"taskId\\":\\"d8800bab-88b6-4c60-9e4f-ed38dbbdd9b3\\"}'),
    taskId?: string(name='TaskId', example='704614'),
    taskType?: string(name='TaskType', example='PATENT_QUERY'),
  }(name='Module'),
  requestId?: string(name='RequestId', description='requestId', example='9831C9A6-3423-52C2-B0E5-5AE01D92C097'),
  success?: boolean(name='Success', description='success', example='True'),
}

model PullTaskResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: PullTaskResponseBody(name='body'),
}

async function pullTaskWithOptions(request: PullTaskRequest, runtime: Util.RuntimeOptions): PullTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aliyunKp)) {
    query['AliyunKp'] = request.aliyunKp;
  }
  if (!Util.isUnset(request.aliyunKpLong)) {
    query['AliyunKpLong'] = request.aliyunKpLong;
  }
  if (!Util.isUnset(request.apiType)) {
    query['ApiType'] = request.apiType;
  }
  if (!Util.isUnset(request.bid)) {
    query['Bid'] = request.bid;
  }
  if (!Util.isUnset(request.bizCode)) {
    query['BizCode'] = request.bizCode;
  }
  if (!Util.isUnset(request.callerParentId)) {
    query['CallerParentId'] = request.callerParentId;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    query['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    query['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.clientIp)) {
    query['ClientIp'] = request.clientIp;
  }
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    query['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.orderId)) {
    query['OrderId'] = request.orderId;
  }
  if (!Util.isUnset(request.originalRequest)) {
    query['OriginalRequest'] = request.originalRequest;
  }
  if (!Util.isUnset(request.popAction)) {
    query['PopAction'] = request.popAction;
  }
  if (!Util.isUnset(request.principalKey)) {
    query['PrincipalKey'] = request.principalKey;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    query['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    query['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    query['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestId)) {
    query['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stsTokenCallerBid)) {
    query['StsTokenCallerBid'] = request.stsTokenCallerBid;
  }
  if (!Util.isUnset(request.stsTokenCallerUid)) {
    query['StsTokenCallerUid'] = request.stsTokenCallerUid;
  }
  if (!Util.isUnset(request.taskType)) {
    query['TaskType'] = request.taskType;
  }
  if (!Util.isUnset(request.userAccessKeyId)) {
    query['UserAccessKeyId'] = request.userAccessKeyId;
  }
  if (!Util.isUnset(request.userBid)) {
    query['UserBid'] = request.userBid;
  }
  if (!Util.isUnset(request.userCallerParentId)) {
    query['UserCallerParentId'] = request.userCallerParentId;
  }
  if (!Util.isUnset(request.userCallerSecurityTransport)) {
    query['UserCallerSecurityTransport'] = request.userCallerSecurityTransport;
  }
  if (!Util.isUnset(request.userCallerType)) {
    query['UserCallerType'] = request.userCallerType;
  }
  if (!Util.isUnset(request.userClientIp)) {
    query['UserClientIp'] = request.userClientIp;
  }
  if (!Util.isUnset(request.userKp)) {
    query['UserKp'] = request.userKp;
  }
  if (!Util.isUnset(request.userMfaPresent)) {
    query['UserMfaPresent'] = request.userMfaPresent;
  }
  if (!Util.isUnset(request.userSecurityToken)) {
    query['UserSecurityToken'] = request.userSecurityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'PullTask',
    version = '2021-01-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function pullTask(request: PullTaskRequest): PullTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return pullTaskWithOptions(request, runtime);
}

model PushRpaTaskRequest {
  aliyunKp?: string(name='AliyunKp', description='aliyunKp', example='1'),
  aliyunKpLong?: long(name='AliyunKpLong', description='aliyunKpLong', example='1'),
  apiType?: string(name='ApiType', description='apiType', example='public'),
  bid?: string(name='Bid', description='bid', example='26842'),
  callerParentId?: long(name='CallerParentId', description='callerParentId', example='1'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport', description='callerSecurityTransport', example='true'),
  callerType?: string(name='CallerType', description='callerType', example='acl'),
  clientIp?: string(name='ClientIp', description='clientIp', example='211.162.236.77'),
  lang?: string(name='Lang', description='lang', example='zh'),
  mfaPresent?: boolean(name='MfaPresent', description='mfaPresent', example='false'),
  modelId?: long(name='ModelId', description='modelId', example='1951'),
  name?: string(name='Name', description='name'),
  originalRequest?: string(name='OriginalRequest', description='originalRequest', example='1'),
  popAction?: string(name='PopAction', description='popAction', example='1'),
  proxyCallerIp?: string(name='ProxyCallerIp', description='proxyCallerIp', example='1'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport', description='proxyCallerSecurityTransport', example='true'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo', description='proxyTrustTransportInfo', example='true'),
  request?: string(name='Request', description='request', example='{}'),
  requestId?: string(name='RequestId', description='requestId', example='B571E901-2F94-5135-A48A-ED3FC45805BF'),
  response?: string(name='Response', description='response', example='{\\"result\\":\\"SUCCESS\\",\\"message\\":\\"null\\",\\"taskId\\":\\"trademark_tihuo_public_cn-7pp2rnsarak\\"}'),
  securityToken?: string(name='SecurityToken'),
  status?: int32(name='Status', description='status', example='0'),
  stsTokenCallerBid?: long(name='StsTokenCallerBid', description='stsTokenCallerBid', example='1'),
  stsTokenCallerUid?: long(name='StsTokenCallerUid', description='stsTokenCallerUid', example='1'),
  taskId?: long(name='TaskId', description='taskId', example='833812'),
  templateId?: long(name='TemplateId', description='templateId', example='26'),
  userAccessKeyId?: string(name='UserAccessKeyId', description='userAccessKeyId', example='1'),
  userBid?: string(name='UserBid', description='userBid', example='1'),
  userCallerParentId?: long(name='UserCallerParentId', description='userCallerParentId', example='1'),
  userCallerSecurityTransport?: boolean(name='UserCallerSecurityTransport', description='userCallerSecurityTransport', example='1'),
  userCallerType?: string(name='UserCallerType', description='userCallerType', example='1'),
  userClientIp?: string(name='UserClientIp', description='userClientIp', example='1'),
  userKp?: string(name='UserKp', description='userKp', example='1'),
  userMfaPresent?: boolean(name='UserMfaPresent', description='userMfaPresent', example='1'),
  userSecurityToken?: string(name='UserSecurityToken', description='userSecurityToken', example='1'),
}

model PushRpaTaskResponseBody = {
  allowRetry?: boolean(name='AllowRetry', description='allowRetry', example='False'),
  appName?: string(name='AppName', description='appName', example='itl-material'),
  dynamicCode?: string(name='DynamicCode', description='dynamicCode', example='1'),
  dynamicMessage?: string(name='DynamicMessage', description='dynamicMessage', example='can not find env: lazada-sg-pre'),
  errorCode?: string(name='ErrorCode', description='errorCode', example='200'),
  errorMsg?: string(name='ErrorMsg', description='errorMsg', example='11111111111111111111111'),
  httpStatusCode?: int32(name='HttpStatusCode', description='httpStatusCode', example='200'),
  module?: string(name='Module', example='58.23.71.83:3128'),
  requestId?: string(name='RequestId', description='requestId', example='ECE5E7EF-6898-5E24-97A1-B96C73BDE26C'),
  success?: boolean(name='Success', description='success', example='True'),
}

model PushRpaTaskResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: PushRpaTaskResponseBody(name='body'),
}

async function pushRpaTaskWithOptions(request: PushRpaTaskRequest, runtime: Util.RuntimeOptions): PushRpaTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aliyunKp)) {
    query['AliyunKp'] = request.aliyunKp;
  }
  if (!Util.isUnset(request.aliyunKpLong)) {
    query['AliyunKpLong'] = request.aliyunKpLong;
  }
  if (!Util.isUnset(request.apiType)) {
    query['ApiType'] = request.apiType;
  }
  if (!Util.isUnset(request.bid)) {
    query['Bid'] = request.bid;
  }
  if (!Util.isUnset(request.callerParentId)) {
    query['CallerParentId'] = request.callerParentId;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    query['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    query['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.clientIp)) {
    query['ClientIp'] = request.clientIp;
  }
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    query['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.modelId)) {
    query['ModelId'] = request.modelId;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.originalRequest)) {
    query['OriginalRequest'] = request.originalRequest;
  }
  if (!Util.isUnset(request.popAction)) {
    query['PopAction'] = request.popAction;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    query['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    query['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    query['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.request)) {
    query['Request'] = request.request;
  }
  if (!Util.isUnset(request.requestId)) {
    query['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.response)) {
    query['Response'] = request.response;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.status)) {
    query['Status'] = request.status;
  }
  if (!Util.isUnset(request.stsTokenCallerBid)) {
    query['StsTokenCallerBid'] = request.stsTokenCallerBid;
  }
  if (!Util.isUnset(request.stsTokenCallerUid)) {
    query['StsTokenCallerUid'] = request.stsTokenCallerUid;
  }
  if (!Util.isUnset(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  if (!Util.isUnset(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  if (!Util.isUnset(request.userAccessKeyId)) {
    query['UserAccessKeyId'] = request.userAccessKeyId;
  }
  if (!Util.isUnset(request.userBid)) {
    query['UserBid'] = request.userBid;
  }
  if (!Util.isUnset(request.userCallerParentId)) {
    query['UserCallerParentId'] = request.userCallerParentId;
  }
  if (!Util.isUnset(request.userCallerSecurityTransport)) {
    query['UserCallerSecurityTransport'] = request.userCallerSecurityTransport;
  }
  if (!Util.isUnset(request.userCallerType)) {
    query['UserCallerType'] = request.userCallerType;
  }
  if (!Util.isUnset(request.userClientIp)) {
    query['UserClientIp'] = request.userClientIp;
  }
  if (!Util.isUnset(request.userKp)) {
    query['UserKp'] = request.userKp;
  }
  if (!Util.isUnset(request.userMfaPresent)) {
    query['UserMfaPresent'] = request.userMfaPresent;
  }
  if (!Util.isUnset(request.userSecurityToken)) {
    query['UserSecurityToken'] = request.userSecurityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'PushRpaTask',
    version = '2021-01-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function pushRpaTask(request: PushRpaTaskRequest): PushRpaTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return pushRpaTaskWithOptions(request, runtime);
}

model PushRpaTaskDetailRequest {
  aliyunKp?: string(name='AliyunKp', description='aliyunKp', example='1'),
  aliyunKpLong?: long(name='AliyunKpLong', description='aliyunKpLong', example='1'),
  apiType?: string(name='ApiType', description='apiType', example='MPC'),
  bid?: string(name='Bid', description='bid', example='26842'),
  callerParentId?: long(name='CallerParentId', description='callerParentId', example='1662339980757310'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport', description='callerSecurityTransport', example='true'),
  callerType?: string(name='CallerType', description='callerType', example='product'),
  clientIp?: string(name='ClientIp', description='clientIp', example='47.114.150.82'),
  inputData?: string(name='InputData', description='inputData', example='http://wssq.sbj.cnipa.gov.cn:9080/tmsve/wssqsy_getCayzDl.xhtml'),
  inputHtml?: string(name='InputHtml', description='inputHtml', example='1'),
  inputScreenshot?: string(name='InputScreenshot', description='inputScreenshot', example='1'),
  lang?: string(name='Lang', description='lang', example='zh'),
  mfaPresent?: boolean(name='MfaPresent', description='mfaPresent', example='false'),
  modelDetailId?: long(name='ModelDetailId', description='modelDetailId', example='6'),
  originalRequest?: string(name='OriginalRequest', description='originalRequest', example='1'),
  outputData?: string(name='OutputData', description='outputData'),
  outputHtml?: string(name='OutputHtml', description='outputHtml', example='<div class=\\"photobox\\" id=\\"Layer3\\" style=\\"visibility: visible'),
  outputScreenshot?: string(name='OutputScreenshot', description='outputScreenshot', example='http://dbu-nap-p-test.oss-cn-beijing.aliyuncs.com/202301/20230110/5782089/1673334129101-d111874e-f181-4d1c-8edc-83e789975329.jpg?Expires=1675926129&OSSAccessKeyId=hObpgEXoca42qH3V&Signature=------'),
  popAction?: string(name='PopAction', description='popAction', example='1'),
  proxyCallerIp?: string(name='ProxyCallerIp', description='proxyCallerIp', example='1'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport', description='proxyCallerSecurityTransport', example='true'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo', description='proxyTrustTransportInfo', example='1'),
  requestId?: string(name='RequestId', description='requestId', example='1940A84F-6D90-5764-9119-6279970C6FF5'),
  securityToken?: string(name='SecurityToken'),
  status?: int32(name='Status', description='status', example='1'),
  stsTokenCallerBid?: long(name='StsTokenCallerBid', description='stsTokenCallerBid', example='1'),
  stsTokenCallerUid?: long(name='StsTokenCallerUid', description='stsTokenCallerUid', example='1'),
  taskDetailId?: long(name='TaskDetailId', description='taskDetailId', example='1'),
  taskId?: long(name='TaskId', description='taskId', example='5596654'),
  userAccessKeyId?: string(name='UserAccessKeyId', description='userAccessKeyId', example='1'),
  userBid?: string(name='UserBid', description='userBid', example='1'),
  userCallerParentId?: long(name='UserCallerParentId', description='userCallerParentId', example='1'),
  userCallerSecurityTransport?: boolean(name='UserCallerSecurityTransport', description='userCallerSecurityTransport', example='1'),
  userCallerType?: string(name='UserCallerType', description='userCallerType', example='1'),
  userClientIp?: string(name='UserClientIp', description='userClientIp', example='1'),
  userKp?: string(name='UserKp', description='userKp', example='1'),
  userMfaPresent?: boolean(name='UserMfaPresent', description='userMfaPresent', example='1'),
  userSecurityToken?: string(name='UserSecurityToken', description='userSecurityToken', example='1'),
}

model PushRpaTaskDetailResponseBody = {
  allowRetry?: boolean(name='AllowRetry', description='allowRetry', example='False'),
  appName?: string(name='AppName', description='appName', example='voldemort-aliyun-com'),
  dynamicCode?: string(name='DynamicCode', description='dynamicCode', example='1'),
  dynamicMessage?: string(name='DynamicMessage', description='dynamicMessage', example='can not find env: vpc-sg-pre'),
  errorCode?: string(name='ErrorCode', description='errorCode', example='200'),
  errorMsg?: string(name='ErrorMsg', description='errorMsg', example='Success. Request Success.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='httpStatusCode', example='200'),
  module?: string(name='Module', example='207,155'),
  requestId?: string(name='RequestId', description='requestId', example='0320C9F4-5EDC-5355-9D7E-DF4CF6C2B3BB'),
  success?: boolean(name='Success', description='success', example='True'),
}

model PushRpaTaskDetailResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: PushRpaTaskDetailResponseBody(name='body'),
}

async function pushRpaTaskDetailWithOptions(request: PushRpaTaskDetailRequest, runtime: Util.RuntimeOptions): PushRpaTaskDetailResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aliyunKp)) {
    query['AliyunKp'] = request.aliyunKp;
  }
  if (!Util.isUnset(request.aliyunKpLong)) {
    query['AliyunKpLong'] = request.aliyunKpLong;
  }
  if (!Util.isUnset(request.apiType)) {
    query['ApiType'] = request.apiType;
  }
  if (!Util.isUnset(request.bid)) {
    query['Bid'] = request.bid;
  }
  if (!Util.isUnset(request.callerParentId)) {
    query['CallerParentId'] = request.callerParentId;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    query['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    query['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.clientIp)) {
    query['ClientIp'] = request.clientIp;
  }
  if (!Util.isUnset(request.inputData)) {
    query['InputData'] = request.inputData;
  }
  if (!Util.isUnset(request.inputHtml)) {
    query['InputHtml'] = request.inputHtml;
  }
  if (!Util.isUnset(request.inputScreenshot)) {
    query['InputScreenshot'] = request.inputScreenshot;
  }
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    query['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.modelDetailId)) {
    query['ModelDetailId'] = request.modelDetailId;
  }
  if (!Util.isUnset(request.originalRequest)) {
    query['OriginalRequest'] = request.originalRequest;
  }
  if (!Util.isUnset(request.outputData)) {
    query['OutputData'] = request.outputData;
  }
  if (!Util.isUnset(request.outputHtml)) {
    query['OutputHtml'] = request.outputHtml;
  }
  if (!Util.isUnset(request.outputScreenshot)) {
    query['OutputScreenshot'] = request.outputScreenshot;
  }
  if (!Util.isUnset(request.popAction)) {
    query['PopAction'] = request.popAction;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    query['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    query['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    query['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestId)) {
    query['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.status)) {
    query['Status'] = request.status;
  }
  if (!Util.isUnset(request.stsTokenCallerBid)) {
    query['StsTokenCallerBid'] = request.stsTokenCallerBid;
  }
  if (!Util.isUnset(request.stsTokenCallerUid)) {
    query['StsTokenCallerUid'] = request.stsTokenCallerUid;
  }
  if (!Util.isUnset(request.taskDetailId)) {
    query['TaskDetailId'] = request.taskDetailId;
  }
  if (!Util.isUnset(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  if (!Util.isUnset(request.userAccessKeyId)) {
    query['UserAccessKeyId'] = request.userAccessKeyId;
  }
  if (!Util.isUnset(request.userBid)) {
    query['UserBid'] = request.userBid;
  }
  if (!Util.isUnset(request.userCallerParentId)) {
    query['UserCallerParentId'] = request.userCallerParentId;
  }
  if (!Util.isUnset(request.userCallerSecurityTransport)) {
    query['UserCallerSecurityTransport'] = request.userCallerSecurityTransport;
  }
  if (!Util.isUnset(request.userCallerType)) {
    query['UserCallerType'] = request.userCallerType;
  }
  if (!Util.isUnset(request.userClientIp)) {
    query['UserClientIp'] = request.userClientIp;
  }
  if (!Util.isUnset(request.userKp)) {
    query['UserKp'] = request.userKp;
  }
  if (!Util.isUnset(request.userMfaPresent)) {
    query['UserMfaPresent'] = request.userMfaPresent;
  }
  if (!Util.isUnset(request.userSecurityToken)) {
    query['UserSecurityToken'] = request.userSecurityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'PushRpaTaskDetail',
    version = '2021-01-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function pushRpaTaskDetail(request: PushRpaTaskDetailRequest): PushRpaTaskDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return pushRpaTaskDetailWithOptions(request, runtime);
}

model SetRedisValueRequest {
  aliyunKp?: string(name='AliyunKp', description='aliyunKp', example='1'),
  aliyunKpLong?: long(name='AliyunKpLong', description='aliyunKpLong', example='1'),
  apiType?: string(name='ApiType', description='apiType', example='part_config_data'),
  bid?: string(name='Bid', description='bid', example='26842'),
  callerParentId?: long(name='CallerParentId', description='callerParentId', example='1'),
  callerSecurityTransport?: boolean(name='CallerSecurityTransport', description='callerSecurityTransport', example='true'),
  callerType?: string(name='CallerType', description='callerType', example='product'),
  clientIp?: string(name='ClientIp', description='clientIp', example='47.114.150.82'),
  key?: string(name='Key', example='1684967696495902'),
  lang?: string(name='Lang', description='lang', example='zh'),
  mfaPresent?: boolean(name='MfaPresent', description='mfaPresent', example='false'),
  originalRequest?: string(name='OriginalRequest', description='originalRequest', example='1'),
  popAction?: string(name='PopAction', description='popAction', example='1'),
  proxyCallerIp?: string(name='ProxyCallerIp', description='proxyCallerIp', example='1'),
  proxyCallerSecurityTransport?: boolean(name='ProxyCallerSecurityTransport', description='proxyCallerSecurityTransport', example='true'),
  proxyTrustTransportInfo?: boolean(name='ProxyTrustTransportInfo', description='proxyTrustTransportInfo', example='true'),
  requestId?: string(name='RequestId', description='requestId', example='F864A883-AD76-53D5-9A24-A6DAD5177697'),
  securityToken?: string(name='SecurityToken'),
  stsTokenCallerBid?: long(name='StsTokenCallerBid', description='stsTokenCallerBid', example='1'),
  stsTokenCallerUid?: long(name='StsTokenCallerUid', description='stsTokenCallerUid', example='1'),
  timeout?: long(name='Timeout', description='timeout', example='5000'),
  userAccessKeyId?: string(name='UserAccessKeyId', description='userAccessKeyId', example='1'),
  userBid?: string(name='UserBid', description='userBid', example='1'),
  userCallerParentId?: long(name='UserCallerParentId', description='userCallerParentId', example='1'),
  userCallerSecurityTransport?: boolean(name='UserCallerSecurityTransport', description='userCallerSecurityTransport', example='true'),
  userCallerType?: string(name='UserCallerType', description='userCallerType', example='1'),
  userClientIp?: string(name='UserClientIp', description='userClientIp', example='1'),
  userKp?: string(name='UserKp', description='userKp', example='1'),
  userMfaPresent?: boolean(name='UserMfaPresent', description='userMfaPresent', example='1'),
  userSecurityToken?: string(name='UserSecurityToken', description='userSecurityToken', example='1'),
  value?: string(name='Value', example='259200000'),
}

model SetRedisValueResponseBody = {
  allowRetry?: boolean(name='AllowRetry', description='allowRetry', example='False'),
  appName?: string(name='AppName', description='appName', example='cloudquery'),
  dynamicCode?: string(name='DynamicCode', description='dynamicCode', example='1'),
  dynamicMessage?: string(name='DynamicMessage', description='dynamicMessage', example='10.151.12.0/24,100.104.36.0/26,47.102.181.0/24,100.104.52.0/24,47.101.109.0/24,120.55.129.0/24,11.115.103.0/24,47.102.234.0/24'),
  errorCode?: string(name='ErrorCode', description='errorCode', example='0'),
  errorMsg?: string(name='ErrorMsg', description='errorMsg'),
  httpStatusCode?: int32(name='HttpStatusCode', description='httpStatusCode', example='200'),
  module?: boolean(name='Module', description='module', example='71,135'),
  requestId?: string(name='RequestId', description='requestId', example='195BABE2-7105-5C16-ABCE-2D0997CCE2E3'),
  success?: boolean(name='Success', description='success', example='True'),
}

model SetRedisValueResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SetRedisValueResponseBody(name='body'),
}

async function setRedisValueWithOptions(request: SetRedisValueRequest, runtime: Util.RuntimeOptions): SetRedisValueResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aliyunKp)) {
    query['AliyunKp'] = request.aliyunKp;
  }
  if (!Util.isUnset(request.aliyunKpLong)) {
    query['AliyunKpLong'] = request.aliyunKpLong;
  }
  if (!Util.isUnset(request.apiType)) {
    query['ApiType'] = request.apiType;
  }
  if (!Util.isUnset(request.bid)) {
    query['Bid'] = request.bid;
  }
  if (!Util.isUnset(request.callerParentId)) {
    query['CallerParentId'] = request.callerParentId;
  }
  if (!Util.isUnset(request.callerSecurityTransport)) {
    query['CallerSecurityTransport'] = request.callerSecurityTransport;
  }
  if (!Util.isUnset(request.callerType)) {
    query['CallerType'] = request.callerType;
  }
  if (!Util.isUnset(request.clientIp)) {
    query['ClientIp'] = request.clientIp;
  }
  if (!Util.isUnset(request.key)) {
    query['Key'] = request.key;
  }
  if (!Util.isUnset(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!Util.isUnset(request.mfaPresent)) {
    query['MfaPresent'] = request.mfaPresent;
  }
  if (!Util.isUnset(request.originalRequest)) {
    query['OriginalRequest'] = request.originalRequest;
  }
  if (!Util.isUnset(request.popAction)) {
    query['PopAction'] = request.popAction;
  }
  if (!Util.isUnset(request.proxyCallerIp)) {
    query['ProxyCallerIp'] = request.proxyCallerIp;
  }
  if (!Util.isUnset(request.proxyCallerSecurityTransport)) {
    query['ProxyCallerSecurityTransport'] = request.proxyCallerSecurityTransport;
  }
  if (!Util.isUnset(request.proxyTrustTransportInfo)) {
    query['ProxyTrustTransportInfo'] = request.proxyTrustTransportInfo;
  }
  if (!Util.isUnset(request.requestId)) {
    query['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.stsTokenCallerBid)) {
    query['StsTokenCallerBid'] = request.stsTokenCallerBid;
  }
  if (!Util.isUnset(request.stsTokenCallerUid)) {
    query['StsTokenCallerUid'] = request.stsTokenCallerUid;
  }
  if (!Util.isUnset(request.timeout)) {
    query['Timeout'] = request.timeout;
  }
  if (!Util.isUnset(request.userAccessKeyId)) {
    query['UserAccessKeyId'] = request.userAccessKeyId;
  }
  if (!Util.isUnset(request.userBid)) {
    query['UserBid'] = request.userBid;
  }
  if (!Util.isUnset(request.userCallerParentId)) {
    query['UserCallerParentId'] = request.userCallerParentId;
  }
  if (!Util.isUnset(request.userCallerSecurityTransport)) {
    query['UserCallerSecurityTransport'] = request.userCallerSecurityTransport;
  }
  if (!Util.isUnset(request.userCallerType)) {
    query['UserCallerType'] = request.userCallerType;
  }
  if (!Util.isUnset(request.userClientIp)) {
    query['UserClientIp'] = request.userClientIp;
  }
  if (!Util.isUnset(request.userKp)) {
    query['UserKp'] = request.userKp;
  }
  if (!Util.isUnset(request.userMfaPresent)) {
    query['UserMfaPresent'] = request.userMfaPresent;
  }
  if (!Util.isUnset(request.userSecurityToken)) {
    query['UserSecurityToken'] = request.userSecurityToken;
  }
  if (!Util.isUnset(request.value)) {
    query['Value'] = request.value;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetRedisValue',
    version = '2021-01-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function setRedisValue(request: SetRedisValueRequest): SetRedisValueResponse {
  var runtime = new Util.RuntimeOptions{};
  return setRedisValueWithOptions(request, runtime);
}

model UpdateAgreementStatusRequest {
  agreementCode?: string(name='AgreementCode', example='10aa40008e081ad7b1fb50bffc3a70b1'),
}

model UpdateAgreementStatusResponseBody = {
  requestId?: string(name='RequestId', example='6BDB1964-A6E9-5946-89A4-523D35645BB6'),
}

model UpdateAgreementStatusResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateAgreementStatusResponseBody(name='body'),
}

async function updateAgreementStatusWithOptions(request: UpdateAgreementStatusRequest, runtime: Util.RuntimeOptions): UpdateAgreementStatusResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.agreementCode)) {
    query['AgreementCode'] = request.agreementCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateAgreementStatus',
    version = '2021-01-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateAgreementStatus(request: UpdateAgreementStatusRequest): UpdateAgreementStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateAgreementStatusWithOptions(request, runtime);
}

